import request from '@/utils/request/request';
import { OnlineRecord } from './model/onlineModel';

// 查询菜单树
export function queryOnlineRecordTree(params: OnlineRecord) {
  return request.get('/api/oauth/tokens', {
    params: { ...params, clientId: 'procurement' },
  });
}

// 下线一个用户记录
export function offOnlineRecord(token: string) {
  return request.delete(`/api/oauth/tokens/${token}`);
}

// 切换组织机构和部门
export function switchOrgDept(data: any) {
  return request.put('/api/oauth/tokens/switch', data);
}
